#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__
#include "cocostudio\CocoStudio.h"
#include "ui/CocosGUI.h"

#include "cocos2d.h"

USING_NS_CC;
using namespace cocos2d::ui;
#include "JsonParser.h"


class HelloWorld:public Layer
{
public:
	virtual bool init() override;
	static Scene* scene();
	void menuCloseCallback(Ref* sender);

	void startButtonCallback(Ref* pSender);
	void vsButtonClickCallback(Ref* pSender);
	void seeButtonCallback(Ref* pSender);
	void helpButtonClickCallback(Ref* pSender);
	void dropButtonClickCallback(Ref* pSender);
	void putMoneyButtonClickCallback(Ref* pSender);
	
	void progressTimeOut(float time);
	void chipMoveToCallback(Ref* pSender);
	void startProgress();
	void cleanup();
	~HelloWorld();
private:
	Node* m_pRootNode;

	Sprite* pokerOfPlayerArrIndex[4][4];
	Sprite* loseSprite;
	Sprite* helpItem;
	Sprite* pokerSprite[3][3];

	Button* vsButton[3];
	Button* seeButton[3];
	Button* putMoneyButton[3];
	Button* dropButton[3];
	Button* helpButton;
	Button* sponPlayer;
	Button* pdropPoker;

	LabelTTF*  progLabelPercent;
	

	ProgressTimer* progTime;

	Button* chip[4];
	Button* m_pAimOfChip;
	Text* dropText[3];
 	Text* hintsText[3];
	Text* winText[3];

	static byte poker[52];
	Sprite* backPoker;
	Vec2 m_aryPos[3];

	byte color[3][3];
	byte size[3][3];
	byte player[3][3];

	//userDefault
 	int numberOfDollar[3];
	Text* dollarOfLabel[3];
	int sumOfAllPutMoney;

	int roundIndex;
	int sumOfOperation;
	int sumOfPresentPlayers;
	int presentPlayerIndex;
	
	bool flagOfDropPlayer[3];

	int  g_time;
	int g_sumTime;
	int percent;
	int i;
	
	
	int numberOfChipLocationX;
	int numberOfChipLocationY;


	CREATE_FUNC(HelloWorld);
};

#endif // __HELLOWORLD_SCENE_H__
